package day15.原子性问题synchronized解决;



public class MyThread11 extends Thread {
    @Override
    public void run() {
        while (true) {
            synchronized (Money1.lock) {
                if (Money1.money != 100000) {
                    System.out.println("结婚基金已经不是十万了");
                    break;
                }
            }
        }
    }
}